/*
 * Version: 1.0.4
 * Build time: Fri Apr 07 2017 14:24:28 GMT+0800 (中国标准时间)
 * Copyright 2017, Alibaba
*/

/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};

/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {

/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId])
/******/ 			return installedModules[moduleId].exports;

/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			exports: {},
/******/ 			id: moduleId,
/******/ 			loaded: false
/******/ 		};

/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);

/******/ 		// Flag the module as loaded
/******/ 		module.loaded = true;

/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}


/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;

/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;

/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "";

/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ function(module, exports, __webpack_require__) {

	// webpack入口，用于打包标签引用的build文件。

	'use strict';

	function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

	var _libVideoPlayerVideoPlayerJs = __webpack_require__(1);

	var _libVideoPlayerVideoPlayerJs2 = _interopRequireDefault(_libVideoPlayerVideoPlayerJs);

	if (!window.VideoPlayer) {
	  window.VideoPlayer = _libVideoPlayerVideoPlayerJs2['default'];
	}

/***/ },
/* 1 */
/***/ function(module, exports, __webpack_require__) {

	"use strict";

	/**
	 * Created by huanlai.whl on 2017/1/10.
	 */
	Object.defineProperty(exports, '__esModule', {
	    value: true
	});

	function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

	var _VideoPlayerControlJs = __webpack_require__(2);

	var _VideoPlayerControlJs2 = _interopRequireDefault(_VideoPlayerControlJs);

	var _CircleLoadingJs = __webpack_require__(3);

	var _CircleLoadingJs2 = _interopRequireDefault(_CircleLoadingJs);

	var _VideoListJs = __webpack_require__(4);

	var _VideoListJs2 = _interopRequireDefault(_VideoListJs);

	__webpack_require__(5);

	var errorImg = '';

	function VideoPlayer(options) {
	    this.TAG = "JSVideoPlayer::";
	    this.KEYEVENT_OK = 13;
	    this.KEYEVENT_BACK = 27;
	    this.KEYEVENT_LEFT = 37;
	    this.KEYEVENT_UP = 38;
	    this.KEYEVENT_RIGHT = 39;
	    this.KEYEVENT_DOWN = 40;

	    //初始值
	    this.currentState = this.VideoState.DEFAULT;
	    this.isKeyeventEnable = false;
	    this.hasInitVideoView = false;
	    this.currentIndex = 0;

	    this.isFullScreen = options && options.isFullScreen != undefined ? options.isFullScreen : this.options.isFullScreen;
	    if (this.isFullScreen) {
	        this.root = this.options.root;
	    } else {
	        this.root = options && options.root ? options.root : this.options.root;
	    }
	    this.isAutoPlay = options && options.isAutoPlay != undefined ? options.isAutoPlay : this.options.isAutoPlay;
	    this.preventDefaultKeyEvent = options && options.preventDefaultKeyEvent != undefined ? options.preventDefaultKeyEvent : this.options.preventDefaultKeyEvent;
	    this.isOriginFullSreen = this.isFullScreen;
	    this._log("isFullScreen == " + this.isFullScreen);
	}

	/**
	 * 默认选项
	 */
	VideoPlayer.prototype.options = {
	    root: document.body,
	    isFullScreen: true,
	    isAutoPlay: true,
	    preventDefaultKeyEvent: false
	};

	/**
	 * VideoState：播放器状态描述符
	 * 0：默认状态
	 * 1：准备状态
	 * 2：播放状态
	 * 3：暂停状态
	 * 4：错误状态
	 * 5: 播放完毕
	 */
	VideoPlayer.prototype.VideoState = {
	    DEFAULT: 0,
	    CAN_PLAY: 1,
	    PLAYING: 2,
	    PAUSED: 3,
	    ERROR: 4,
	    OVER: 5
	};

	VideoPlayer.prototype.contraller = new _VideoPlayerControlJs2['default']();

	VideoPlayer.prototype.initVideoView = function () {
	    var videoTpl = '<div class="video_item"> ' + '<video class="video_palyer" adoplayer autoplay="autoplay"></video>' + '<div class="videoPanel"><div class="triangleRight"><span></span></div></div></div>';

	    var div = document.createElement('div');
	    div.innerHTML = videoTpl;
	    this._domNode = div.childNodes[0];
	    this.root.appendChild(this._domNode);
	    if (!this.listView && this.playList) {
	        this.setPlayList(this.playList, this.currentIndex);
	    }
	    this._pauseView = this._domNode.querySelector('.videoPanel');
	    this._bufferView = new _CircleLoadingJs2['default']({
	        container: this._domNode,
	        defaultShow: false
	    });
	    if (!this.isOriginFullSreen) {
	        this._scale = this.root.clientWidth / 1920;
	        this._pauseView.style.transform = "scale(" + this._scale + ")";
	        this._bufferView.resize(this._scale);
	    }
	    this._videoPlayer = this._domNode.querySelector('video');
	    this._bindEvent();
	};

	VideoPlayer.prototype.updatePauseView = function (domStr) {
	    this._pauseView.innerHTML = domStr;
	};

	/**
	 * 更新播放url,隐藏的VideoView会被显示出来
	 * 如果不需要播放不需要更新datasrc，不要做无用功
	 * @param datasrc
	 */
	VideoPlayer.prototype.setDataSrc = function (datasrc, index) {
	    Log("datasrc === " + JSON.stringify(datasrc));
	    if (!this.hasInitVideoView) {
	        this.hasInitVideoView = true;
	        this.initVideoView();
	    } else {
	        this.contraller.updateVideoPlayer(this._videoPlayer);
	    }
	    this.currentData = datasrc;
	    if (index) {
	        this.currentIndex = index;
	    }
	    if (this.hasHided) {
	        if (!this.hasHided.isPlayFromLastTime) {
	            this.contraller.reset();
	        }
	        this.show();
	    } else if (this.currentData) {
	        this.contraller.reset();
	        this._videoPlayer.src = this.currentData.url;
	    }
	    this.hideError();
	    if (this.currentData) {
	        this.contraller.setVideoName(this.currentData.name);
	    }
	    this._setBufferViewVisible(true);
	};

	// 和setData方法的差别：这个数据是需要加工的，本身不会触发播放；
	// 自动下一集或选集播放时需要主动获取详情然后调用setDateSrc进行播放
	VideoPlayer.prototype.setPlayList = function (playList, index) {
	    Log(" setPlayList playList");
	    if (playList instanceof Array) {
	        this.playList = playList;
	        if (index && index >= 0 && index < playList.length) {
	            this.currentIndex = index;
	        } else {
	            this.currentIndex = 0;
	        }
	        if (!this.hasInitVideoView) {
	            return;
	        }
	        if (!this.listView) {
	            this.listView = new _VideoListJs2['default'](this, this.listViewItem);
	        }
	        this.listView.setPlayList(playList, this.currentIndex);
	        if (this.itemRender) {
	            this.listView.setItemRender(this.itemRender);
	        }
	    } else {
	        this._log("playList must be array");
	    }
	};

	//设置lieView的Item样式
	VideoPlayer.prototype.updateListItem = function (listViewItem) {
	    this.listViewItem = listViewItem;
	};

	VideoPlayer.prototype.setListItemRender = function (callBaclk) {
	    this.itemRender = callBaclk;
	    if (this.listView) {
	        this.listView.setItemRender(callBaclk);
	    }
	};

	VideoPlayer.prototype._bindEvent = function () {
	    this._log("bindEvent");
	    this.callBack1 = this._onVideoCanplay.bind(this);
	    this.callBack2 = this._onVideoEnd.bind(this);
	    this.callBack3 = this._onVidepPlay.bind(this);
	    this.callBack4 = this._onVidepPlaying.bind(this);
	    this.callBack5 = this._onVideoPaused.bind(this);
	    this.callBack6 = this._onVideoWaiting.bind(this);
	    this.callBack7 = this._onVideoError.bind(this);
	    this.callBack8 = this._onTimeUpdate.bind(this);
	    this._videoPlayer.addEventListener('canplay', this.callBack1);
	    this._videoPlayer.addEventListener('ended', this.callBack2);
	    this._videoPlayer.addEventListener('play', this.callBack3);
	    this._videoPlayer.addEventListener('playing', this.callBack4);
	    this._videoPlayer.addEventListener('pause', this.callBack5);
	    this._videoPlayer.addEventListener('waiting', this.callBack6);
	    this._videoPlayer.addEventListener('error', this.callBack7);
	    this._videoPlayer.addEventListener('timeupdate', this.callBack8);
	    this._videoPlayer.onbuffering = this._onVideoBuffering.bind(this);
	    this.contraller.updateVideoPlayer(this._videoPlayer);
	    if (this.isFullScreen == true) {
	        this.setKeyeventEnable(true);
	    }
	};

	VideoPlayer.prototype._unBindEvent = function () {
	    this._log("unBindEvent");

	    this._videoPlayer.removeEventListener('canplay', this.callBack1);
	    this._videoPlayer.removeEventListener('ended', this.callBack2);
	    this._videoPlayer.removeEventListener('play', this.callBack3);
	    this._videoPlayer.removeEventListener('playing', this.callBack4);
	    this._videoPlayer.removeEventListener('pause', this.callBack5);
	    this._videoPlayer.removeEventListener('waiting', this.callBack6);
	    this._videoPlayer.removeEventListener('error', this.callBack7);
	    this._videoPlayer.removeEventListener('timeupdate', this.callBack8);
	    this._videoPlayer.onbuffering = null;
	};

	//--------------------------------Paly  Contral---------------------------------------
	VideoPlayer.prototype.play = function () {
	    this._log("play");
	    if (this.currentState == this.VideoState.CAN_PLAY || this.currentState == this.VideoState.PAUSED || this.currentState == this.VideoState.OVER) {
	        this._videoPlayer.play();
	        if (this.currentState == this.VideoState.CAN_PLAY) {
	            this.currentState = this.VideoState.PLAYING;
	        }
	    }
	};

	VideoPlayer.prototype.pause = function () {
	    this._log("pause");
	    if (this.currentState == this.VideoState.CAN_PLAY || this.currentState == this.VideoState.PLAYING) {
	        if (this._bufferView.isShow) {
	            this._log(" is buffering now , cannot pause");
	        } else {
	            this._videoPlayer.pause();
	        }
	    }
	};

	VideoPlayer.prototype.showError = function (msg) {
	    if (!this.errorPage) {
	        var errorDom = "<div class=\"play_error_page\"><img src=\"" + errorImg + "\"/><p>" + msg + "</p></div>";
	        var div = document.createElement('div');
	        div.innerHTML = errorDom;
	        this.errorPage = div.childNodes[0];
	        this._domNode.appendChild(this.errorPage);
	    }
	};

	VideoPlayer.prototype.hideError = function () {
	    if (this.errorPage) {
	        this.show();
	        this._domNode.removeChild(this.errorPage);
	        this.errorPage = null;
	    }
	};

	VideoPlayer.prototype.checkAndHandleError = function checkAndHandleError(e) {
	    var self = this;
	    var mainErrorCode = e.errorCode;
	    this._log("  checkAndHandleError mainErrorCode --> " + mainErrorCode);

	    if (mainErrorCode !== null && mainErrorCode !== undefined) {
	        if (typeof mainErrorCode === 'string') {
	            mainErrorCode = parseInt(mainErrorCode);
	        }
	        var errorCode = e.errorCode;
	        if (mainErrorCode === 1300 || mainErrorCode === 1301) {

	            // 把主错误码暂存
	            e.mainErrorCode = mainErrorCode;

	            // 取出子集错误码
	            var errorSubcode = e.errorSubcode;
	            if (typeof errorSubcode === 'string') {
	                errorSubcode = parseInt(errorSubcode);
	            }

	            this._log("--checkAndHandleError-- mainErrorCode --> " + mainErrorCode + '; errorSubcode = ' + errorSubcode);

	            if (mainErrorCode === 300) {

	                e.errorCode = errorSubcode;

	                if (errorSubcode >= 500 && errorSubcode < 600) {
	                    e.msg = '服务器错误，无法播放';
	                } else if (errorSubcode >= 400 && errorSubcode < 500) {
	                    switch (errorSubcode) {
	                        case 401:
	                            e.msg = '播放请求认证失败，无法播放';
	                            break;
	                        case 403:
	                            e.msg = '播放请求被拒绝，无法播放';
	                            break;
	                        case 404:
	                            e.msg = '播放请求不存在，无法播放';
	                            break;
	                        case 405:
	                            e.msg = '播放请求超时，无法播放';
	                            break;
	                        default:
	                            e.msg = '网络请求异常，无法播放';
	                            break;
	                    }
	                } else {
	                    e.msg = '访问视频源失败，无法播放';
	                }
	            } else if (mainErrorCode === 301) {
	                var httpErrorCode = errorSubcode & 0x0000ffff;
	                e.errorCode = httpErrorCode;

	                var msg = null;
	                switch (httpErrorCode) {
	                    case 401:
	                        msg = '播放请求认证失败，无法播放';
	                        break;
	                    case 403:
	                        msg = '播放请求被拒绝，无法播放';
	                        break;
	                    case 404:
	                        msg = '播放请求不存在，无法播放';
	                        break;
	                    case 408:
	                        msg = '播放请求超时,无法播放';
	                        break;
	                }

	                if (!msg) {
	                    if (httpErrorCode >= 400 && httpErrorCode <= 500) {
	                        msg = '网络请求异常,无法播放';
	                    } else if (httpErrorCode >= 500 && httpErrorCode <= 600) {
	                        msg = '服务器错误,无法播放';
	                    } else {
	                        // 如果没有处理,那就返回null
	                        return null;
	                    }
	                }
	                e.msg = msg;
	            }
	        } else {
	            // 不是300，或者301
	            for (var error in this.CUSTOMER_VIDEO_ERROR) {
	                if (!this.CUSTOMER_VIDEO_ERROR.hasOwnProperty(error)) continue;
	                this._log(this.TAG + error);
	                if (this.CUSTOMER_VIDEO_ERROR[error].code === errorCode) {
	                    this._log(this.CUSTOMER_VIDEO_ERROR[error]);
	                    e = this.CUSTOMER_VIDEO_ERROR[error];
	                }
	            }
	        }
	    }
	    if (e.msg) {
	        return e;
	    }
	    return null;
	};

	VideoPlayer.prototype.CUSTOMER_VIDEO_ERROR = {
	    MEDIA_ERROR_UNKNOWN: {
	        code: 1,
	        msg: "未知错误,无法播放"
	    },

	    MEDIA_ERROR_SERVER_DIED: {
	        code: 100,
	        msg: "播放器异常,无法播放"
	    },

	    MEDIA_ERROR_NOT_VALID_FOR_PROGRESSIVE_PLAYBACK: {
	        code: 200,
	        msg: "视频源解析失败，无法播放"
	    },

	    // 这类错误要具体划分
	    MEDIA_ERROR_SOURCE: {
	        code: 300,
	        msg: "获取视频源失败，无法播放"
	    },

	    MEDIA_ERROR_IO: {
	        code: -1004,
	        msg: "网络无法连接,无法播放"
	    },

	    MEDIA_ERROR_MALFORMED: {
	        code: -1007,
	        msg: "视频格式不支持,无法播放"
	    },

	    MEDIA_ERROR_UNSUPPORTED: {
	        code: -1010,
	        msg: "音、视频格式不支持，无法播放"
	    },

	    ERRORCODE_CUSTOMER_BAD_AUTHENTICATION: {
	        code: 2002,
	        msg: "播放器错误,无法播放"
	    },

	    MEDIA_ERROR_FATAL_ERROR: {
	        code: -88,
	        msg: "播放器错误,无法播放"
	    },

	    MEDIA_ERROR_OPERATION_FAILED: {
	        code: -90,
	        msg: "播放器错误,无法播放"
	    },

	    MEDIA_ERROR_TIMED_OUT: {
	        code: -110,
	        msg: "播放器初始化失败，无法播放"
	    },

	    ERROR_UNKNOWN: {
	        code: 255,
	        msg: "未知错误"
	    }
	};

	VideoPlayer.prototype.playNext = function () {
	    this._log("playNext");
	    if (this.currentIndex >= this.playList.length || this.currentIndex < 0) {
	        this.currentIndex = 0;
	    } else {
	        this.currentIndex++;
	    }
	    this.currentData = this.playList[this.currentIndex];
	    if (this.onItemClickListener) {
	        this.onItemClickListener(this.currentData);
	    } else {
	        this._videoPlayer.src = this.currentData.url;
	        this.contraller.setVideoName(this.currentData.name);
	        this._setBufferViewVisible(true);
	    }
	};

	VideoPlayer.prototype._onVideoCanplay = function (e) {
	    this._log("_onVideoCanplay: " + JSON.stringify(e) + " this.isAutoPlay == " + this.isAutoPlay);
	    this.onPrepareListener && this.onPrepareListener();
	    this.currentState = this.VideoState.CAN_PLAY;
	    //只有在同一视频且没有结束才设置时间
	    if (this.hideState && this.hideState.datasrc.url == this.currentData.url && this.hideState.videoState != this.VideoState.OVER) {
	        this._log("_onVideoCanplay: " + JSON.stringify(e) + " this.isAutoPlay == " + this.isAutoPlay);
	        if (this.hideState.isPlayFromLastTime) {
	            this._videoPlayer.currentTime = this.hideState.time;
	        }
	        if (this.hideState.videoState == this.VideoState.PAUSED && !this.isFullScreen) {
	            setTimeout((function () {
	                this.pause();
	            }).bind(this), 500);
	        } else if (this.hideState.videoState == this.VideoState.PLAYING) {
	            this.play();
	        }
	        this.hideState = null;
	    } else if (!this.isFullScreen && !this.isAutoPlay) {
	        //全屏播放默认开始播放
	        setTimeout((function () {
	            this.pause();
	        }).bind(this), 500);
	    } else {
	        this.play();
	    }
	    if (this.isFullScreen) {
	        this.contraller.updateDuration(this._videoPlayer.duration);
	        this.contraller.showVideoControls();
	    }
	    this._setBufferViewVisible(false);
	};

	VideoPlayer.prototype._onVideoError = function (e) {
	    this._log("__onVideoError: " + JSON.stringify(e));
	    var _error = this.checkAndHandleError(e);
	    var hasHandled = this.onErrorListener ? true === this.onErrorListener(e) : false;
	    if (_error && !hasHandled) {
	        // 有效的错误，那么发出错误事件
	        this.currentState = this.VideoState.ERROR;
	        this.showError(_error.msg);
	    }
	    this._setBufferViewVisible(false);
	    this._setPausedViewVisible(false);
	};

	VideoPlayer.prototype._onVideoWaiting = function (e) {
	    this._log("_onVideoWaiting: ");
	    this._setBufferViewVisible(true);
	};

	VideoPlayer.prototype._onVideoBuffering = function (e) {
	    this._setBufferViewVisible(true, e.speed, e.buffered);
	};

	VideoPlayer.prototype._onTimeUpdate = function (e) {
	    this.contraller.onTimeUpdate();
	};

	VideoPlayer.prototype._onVideoEnd = function (e) {
	    this._log("_onVideoEnd: " + JSON.stringify(e));
	    this.currentState = this.VideoState.OVER;
	    if (this.onCompleteListener) {
	        this.onCompleteListener();
	    } else if (this.playList && this.playList.length > 1) {
	        this.playNext();
	    } else if (this.isFullScreen) {
	        //开始的时候是小窗才采用小窗播放
	        if (!this.isOriginFullSreen) {
	            this.playInSmallWindow();
	            e.preventDefault();
	            e.stopPropagation();
	        } else {
	            this.hide();
	        }
	    }
	};

	VideoPlayer.prototype._onVidepPlay = function (e) {
	    this._log("_onVideoPlay: " + JSON.stringify(e));
	    this.currentState = this.VideoState.PLAYING;
	    this._setPausedViewVisible(false);
	    this.hideError();
	};

	VideoPlayer.prototype._onVidepPlaying = function (e) {
	    this._log("_onVidepPlaying: " + JSON.stringify(e));
	    this.currentState = this.VideoState.PLAYING;
	    this.hideError();
	    this._setBufferViewVisible(false);
	    this._setPausedViewVisible(false);
	};

	VideoPlayer.prototype._onVideoPaused = function (e) {
	    this._log("_onVideoPaused: " + JSON.stringify(e));
	    this.currentState = this.VideoState.PAUSED;
	    this._setPausedViewVisible(true);
	};

	VideoPlayer.prototype._setPausedViewVisible = function (isShow) {
	    if (isShow) {
	        this._pauseView.style.display = "block";
	    } else {
	        this._pauseView.style.display = "none";
	    }
	};
	VideoPlayer.prototype._setBufferViewVisible = function (isShow, percent, speed) {
	    this._log("isShow == " + isShow + " percent " + percent + " speed == " + speed);
	    if (isShow) {
	        if (!this._bufferView.isShow) {
	            this._bufferView.isShow = true;
	            this._bufferView.show();
	        }
	        if (percent != undefined) {
	            this._log(" percent " + percent);
	            this._bufferView.setMessage1(percent + "%");
	        } else {
	            this._bufferView.setMessage1("");
	        }
	        if (speed != undefined) {
	            this._log(" speed == " + speed);
	            speed = parseFloat(speed) / 8;
	            speed = speed.toFixed(1);
	            this._bufferView.setMessage2("下载速度：" + speed + "KB/s");
	        } else {
	            this._bufferView.setMessage2("");
	        }
	    } else {
	        this._bufferView.isShow = false;
	        this._bufferView.hide();
	    }
	};

	VideoPlayer.prototype._log = function (log) {
	    console.log("[" + this.TAG + "]: " + log);
	};

	VideoPlayer.prototype.hasClass = function (obj, cls) {
	    return obj.className.match(new RegExp('(\\s|^)' + cls + '(\\s|$)'));
	};
	VideoPlayer.prototype.addClass = function (obj, cls) {
	    if (!this.hasClass(obj, cls)) {
	        obj.className += " " + cls;
	    }
	};
	VideoPlayer.prototype.removeClass = function (obj, cls) {
	    if (this.hasClass(obj, cls)) {
	        var reg = new RegExp('(\\s|^)' + cls + '(\\s|$)');
	        obj.className = obj.className.replace(reg, ' ');
	    }
	};

	VideoPlayer.prototype.onKeyDown = function (e) {
	    if (this.currentState == this.VideoState.ERROR || this.currentState == this.VideoState.DEFAULT) {
	        this._log("currentState is " + this.currentState + ", donnot handle keyEvent");
	    }
	    e.preventDefault();
	    e.stopPropagation();
	    switch (e.keyCode) {
	        case this.KEYEVENT_LEFT:
	            if (this.listView && this.listView.isShow()) {
	                this.listView.hide();
	            }
	            this.contraller.handleProgress(false);
	            break;

	        case this.KEYEVENT_RIGHT:
	            if (this.listView && this.listView.isShow()) {
	                this.listView.hide();
	            }
	            this.contraller.handleProgress(true);
	            break;

	        case this.KEYEVENT_BACK:
	            //防止直接销毁页面
	            if (yunos && yunos.context) {
	                yunos.context.preventDefaultKeyEvent(true);
	            }
	            break;
	    }
	};

	VideoPlayer.prototype.onKeyUp = function (e) {
	    this._log("onKeyUp keyCoe == " + e.keyCode + "currentState is " + this.currentState);
	    if (this.currentState == this.VideoState.ERROR || this.currentState == this.VideoState.DEFAULT) {
	        this._log("currentState is " + this.currentState + ", donnot handle keyEvent");
	    }
	    e.preventDefault();
	    e.stopPropagation();
	    switch (e.keyCode) {
	        case this.KEYEVENT_LEFT:
	        case this.KEYEVENT_RIGHT:
	            this.contraller.handlePregressEnd();
	            this._log("currentState == " + this.currentState);
	            if (this.currentState == this.VideoState.PAUSED || this.currentState == this.VideoState.CAN_PLAY) {
	                this.play();
	            } else if (this.currentState == this.VideoState.OVER && e.keyCode == this.KEYEVENT_LEFT) {
	                setTimeout((function () {
	                    this.play();
	                }).bind(this), 1000);
	            }
	            break;

	        case this.KEYEVENT_OK:
	            if (this.listView && this.listView.isShow()) {
	                return;
	            }
	            if (this.currentState == this.VideoState.PAUSED || this.currentState == this.VideoState.CAN_PLAY) {
	                this.play();
	            } else if (this.currentState == this.VideoState.PLAYING) {
	                this.pause();
	            }
	            if (this.isFullScreen) {
	                this.contraller.showVideoControls();
	            }
	            break;

	        case this.KEYEVENT_BACK:
	            //展示列表时先去掉列表显示
	            if (this.listView && this.listView.isShow()) {
	                this.listView.hide();
	                break;
	            }
	            //开始的时候是小窗才采用小窗播放
	            if (!this.isOriginFullSreen) {
	                this.playInSmallWindow();
	            } else {
	                this.contraller.hideVideoControls();
	                this.hide();
	            }
	            if (yunos && !this.preventDefaultKeyEvent) {
	                yunos.context.preventDefaultKeyEvent(false);
	            }
	            break;

	        case this.KEYEVENT_UP:
	        case this.KEYEVENT_DOWN:
	            if (this.listView) {
	                this.contraller.hideVideoControls();
	                this.listView.show();
	            }
	    }
	};

	VideoPlayer.prototype.setKeyeventEnable = function (isEnable) {
	    this._log("setKeyeventEnable isEnable == " + isEnable + " isKeyeventEnable == " + this.isKeyeventEnable + " this.isFullScreen == " + this.isFullScreen);
	    if (!this.isFullScreen && isEnable) {
	        this._log(" play in small window cannot set keyevent enable");
	        return;
	    }
	    if (!this.onKeyDownImpl) {
	        this.onKeyDownImpl = this.onKeyDown.bind(this);
	    }
	    if (!this.onKeyUpImpl) {
	        this.onKeyUpImpl = this.onKeyUp.bind(this);
	    }
	    if (isEnable && !this.isKeyeventEnable) {
	        this.isKeyeventEnable = true;
	        document.addEventListener("keydown", this.onKeyDownImpl);
	        document.addEventListener("keyup", this.onKeyUpImpl);
	        if (FocusEngine) {
	            FocusEngine.getRoot().freeze();
	        }
	    } else if (!isEnable && this.isKeyeventEnable) {
	        this.isKeyeventEnable = false;
	        document.removeEventListener("keydown", this.onKeyDownImpl);
	        document.removeEventListener("keyup", this.onKeyUpImpl);
	        if (FocusEngine) {
	            FocusEngine.getRoot().activate();
	        }
	    }
	};

	VideoPlayer.prototype.playInFullScreen = function () {
	    this._log("playInFullScreen fullSreen == " + this.isFullScreen);
	    if (!this.isFullScreen) {
	        this.isFullScreen = true;
	        this.contraller.updateDuration(this._videoPlayer.duration);
	        this.setKeyeventEnable(true);
	        this.addClass(this._domNode, "video_item_fullscrren");
	        if (this.currentState == this.VideoState.OVER) {
	            this.setDataSrc(this.currentData);
	        }
	        this._pauseView.style.transform = "scale(1})";
	        this._bufferView.resize(1);
	    }
	};

	VideoPlayer.prototype.playInSmallWindow = function () {
	    if (!this.isOriginFullSreen) {
	        this.isFullScreen = false;
	        this.contraller.hideVideoControls();
	        this.setKeyeventEnable(false);
	        this.removeClass(this._domNode, "video_item_fullscrren");
	        this._pauseView.style.transform = "scale(" + this._scale + ")";
	        this._bufferView.resize(this._scale);
	    }
	};

	VideoPlayer.prototype.show = function () {
	    if (!this.hasHided) {
	        this._log(" video was not hided , no need to shown ");
	        return true;
	    }
	    this._log(" show video ");
	    if (this.isFullScreen) {
	        this.setKeyeventEnable(true);
	    }
	    this.removeClass(this._domNode, "video_item_zero");
	    if (this.currentData) {
	        this._videoPlayer.src = this.currentData.url;
	    }
	    this.hasHided = false;
	};

	VideoPlayer.prototype.hide = function (isPlayFromLastTime) {
	    if (this.hasHided) {
	        this._log(" video was hided , donnot hide again ");
	        return true;
	    }
	    this._log(" hide video ");
	    this.setKeyeventEnable(false);
	    this.hideState = {
	        datasrc: this.currentData,
	        isPlayFromLastTime: isPlayFromLastTime,
	        time: isPlayFromLastTime ? this._videoPlayer.currentTime : 0,
	        videoState: this.currentState
	    };
	    this._videoPlayer.src = "";
	    this.addClass(this._domNode, "video_item_zero");
	    this._setPausedViewVisible(false);
	    this._setBufferViewVisible(false);
	    this.contraller.hideVideoControls();
	    this.hasHided = true;
	};

	VideoPlayer.prototype.destroy = function () {
	    this._log(" destroy video ");
	    this.hide();
	    this._unBindEvent();
	    this._domNode.parentNode.removeChild(this._domNode);
	};

	VideoPlayer.prototype.setOnErrorListener = function (playCallback) {
	    this.onErrorListener = playCallback;
	};

	VideoPlayer.prototype.setOnCompleteListener = function (playCallback) {
	    this.onCompleteListener = playCallback;
	};

	VideoPlayer.prototype.setOnPrepareListener = function (playCallback) {
	    this.onPrepareListener = playCallback;
	};

	VideoPlayer.prototype.setOnItemClickListener = function (playCallback) {
	    this.onItemClickListener = playCallback;
	};

	exports['default'] = VideoPlayer;
	module.exports = exports['default'];

/***/ },
/* 2 */
/***/ function(module, exports) {

	/**
	 * Created by huanlai.whl on 2017/1/10.
	 */
	"use strict";

	Object.defineProperty(exports, "__esModule", {
	    value: true
	});
	function VideoController(videoView) {
	    this.TAG = "JSVideoPlayer::";
	    this.baseSpeed = 10;
	    this._duration = 0;
	    this._currentTimeStep = 0;

	    //timers
	    this._hideTimer = null;

	    this._videoPlaying = true;
	    this._fullScreen = false;

	    this.videoWidget = videoView;
	    this._initView(document.body);
	    console.log(this.TAG + "on VideoController constructor");
	}

	VideoController.prototype._initView = function (parentNode) {
	    var div = document.createElement('div');
	    div.innerHTML = '<div class="videoCotraller" id="videoCotraller">' + '<div class="videoHeaderMask"><p class="videoTitle">test</p></div>' + '<div class="videoControls"><p class="currentTime"></p>' + '<div class="videoPointer"><span><em></em></span></div>' + '<div class="progressWrap"><div class="playProgress"><img class="progressButton" fe-role="Widget" /></div></div>' + '<p class="videoDuration"></p></div></div>';

	    this.videoControl = div.childNodes[0];
	    parentNode.appendChild(this.videoControl);
	    this.currentTimeV = this.videoControl.querySelector('.currentTime'); //当前时间
	    this.progressWrapV = this.videoControl.querySelector('.progressWrap'); //进度背景
	    this.playProgressV = this.videoControl.querySelector('.playProgress'); //进度前景
	    this.videoPointerV = this.videoControl.querySelector('.videoPointer'); //上面的时间戳
	    this.videoDurationV = this.videoControl.querySelector('.videoDuration'); //标题
	    this.videoTitleV = this.videoControl.querySelector('.videoTitle'); //标题
	};

	VideoController.prototype.setVideoName = function (name) {
	    this.videoTitleV.innerHTML = name;
	};

	VideoController.prototype.onTimeUpdate = function () {
	    if (!this.isHandleProgressing) {
	        this.updateProgress();
	    }
	};

	/**
	 * 隐藏进度条
	 */
	VideoController.prototype.hideVideoControls = function () {
	    if (this.videoControl) {
	        this.videoControl.style.opacity = 0;
	    }
	};

	/**
	 * 显示进度条
	 */
	VideoController.prototype.showVideoControls = function () {
	    var self = this;
	    console.log(this.TAG + "showVideoControls");
	    this.videoControl.style.opacity = 1;
	    if (this._hideTimer) {
	        clearTimeout(this._hideTimer);
	    }
	    this._hideTimer = setTimeout(function () {
	        self.hideVideoControls();
	    }, 4000);
	};

	/**
	 * 每次播放更新播放器时间
	 * @param duration
	 */
	VideoController.prototype.updateDuration = function (duration) {
	    console.log(this.TAG + ":: duration is " + duration);
	    this._duration = parseInt(duration);
	    console.log(this.TAG + ":: this._duration is " + this._duration);
	    this.highSpeed = Math.floor(this._duration / 60);
	    console.log(this.TAG + ":: highSpeed is " + this.highSpeed);
	    if (this.highSpeed <= this.baseSpeed) {
	        this.highSpeed = this.baseSpeed;
	    }
	    this.videoDurationV.innerHTML = this.getLegalTime(this._duration);
	};

	/**
	 * 更新contraller进度，不传递time是播放器自动更新时间
	 * 传递time是快进的逻辑
	 * @param time
	 */
	VideoController.prototype.updateProgress = function (time) {
	    if (time === undefined) {
	        this.currentTimeV.innerHTML = this.getLegalTime(this.videoWidget.currentTime);
	        this.playProgressV.style.width = this.videoWidget.currentTime / this._duration * this.progressWrapV.offsetWidth + "px";
	        this.videoPointerV.style.display = "none";
	    } else {
	        console.log(this.TAG + "in updateProgress: setTime=" + time);
	        this.currentTimeV.innerHTML = this.getLegalTime(time);
	        this.playProgressV.style.width = time / this._duration * this.progressWrapV.offsetWidth + "px";
	        this.videoPointerV.style.display = "block";
	        this.videoPointerV.innerHTML = '<span><em></em></span>' + this.getLegalTime(time);
	        var move = 115 + time / this._duration * this.progressWrapV.offsetWidth;
	        this.videoPointerV.style.left = move + "px";
	    }
	};

	/**
	 * 将进度条复位
	 */
	VideoController.prototype.reset = function () {
	    this.currentTimeV.innerHTML = this.getLegalTime(0);
	    this.playProgressV.style.width = "0px";
	};

	/**
	 * 快进的时候根据时间差计算最新进度
	 * @param timer
	 * @returns {*}
	 */
	VideoController.prototype.getVideoPlayProgress = function (timer) {
	    this._currentTimeStep = this._currentTimeStep + timer;
	    console.log(this.TAG + "getVideoPlayProgress, _currentTimeStep = " + this._currentTimeStep);
	    var setTime = this.videoWidget.currentTime + this._currentTimeStep;
	    if (setTime >= this._duration) {
	        setTime = this._duration;
	    }
	    if (setTime <= 0) {
	        setTime = 0;
	    }
	    return setTime;
	};

	/**
	 * 快进结束，seekTo功能
	 */
	VideoController.prototype.handlePregressEnd = function () {
	    console.log(this.TAG + "setVideoCurrentTime: timeStep = " + this._currentTimeStep);
	    this.isHandleProgressing = false;
	    var time = this.videoWidget.currentTime + this._currentTimeStep;
	    var currentTime = 0;
	    if (time >= this._duration) {
	        currentTime = this._duration;
	    }
	    if (time <= 0) {
	        currentTime = 0;
	    }
	    if (time > 0 && time < this._duration) {
	        currentTime = time;
	    }
	    console.log(this.TAG + " go to set video time, currentTime= " + currentTime);
	    this.videoWidget.currentTime = currentTime;
	    //this.videoWidget.play();
	    this._currentTimeStep = 0;
	};

	/**
	 * 将second换算成时分秒
	 * @param time
	 * @returns {string}
	 */
	VideoController.prototype.getLegalTime = function (time) {
	    var hour = Math.floor(time / 3600);
	    if (hour < 10) {
	        hour = "0" + hour;
	    }
	    var other = time % 3600;
	    var minute = Math.floor(other / 60);
	    if (minute < 10) {
	        minute = "0" + minute;
	    }
	    var second = (other % 60).toFixed(0);
	    if (second < 10) {
	        second = "0" + second;
	    }
	    return hour + ':' + minute + ':' + second;
	};

	/**
	 * 快进执行逻辑
	 * @param step
	 */
	VideoController.prototype.handleProgress = function (isRight) {
	    var step = 0;
	    if (this.isHandleProgressing) {
	        step = this.highSpeed;
	    } else {
	        step = this.baseSpeed;
	        this.isHandleProgressing = true;
	    }
	    if (!isRight) {
	        step = -step;
	    }
	    console.log(this.TAG + "handleProgress, step=" + step);
	    this.showVideoControls();
	    this.updateProgress(this.getVideoPlayProgress(step));
	};

	/**
	 * 销毁播放器进度条
	 */
	VideoController.prototype.destroyVideoPlayer = function () {
	    this.hideVideoControls();
	};

	/**
	 * 更换处理的VideoPlayer
	 */
	VideoController.prototype.updateVideoPlayer = function (videoPlayer) {
	    this.videoWidget = videoPlayer;
	};

	exports["default"] = VideoController;
	module.exports = exports["default"];

/***/ },
/* 3 */
/***/ function(module, exports) {

	'use strict';

	Object.defineProperty(exports, '__esModule', {
	  value: true
	});

	function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }

	var TAG = "JSVideoPlayer:: ";
	var BASE_WIDTH = 1920; // 作为参考的基准宽度
	var imgSrc = '';

	/**
	 * NewLoading cyclone 系统最新loading，圆环滚动动画
	 * @author 澜嵚 <zhenjiang.szj@alibaba-inc.com>
	 * @since 2016/10/07
	 * @class
	 */

	var NewLoading = (function () {

	  /**
	   * constructor 构造函数
	   * @memberOf NewLoading.prototype
	   * @param cfg {Object} 配置参数
	   *   @param container     {String}  loading元素容器  默认为body
	   *   @param showBlock     {Boolean} 加载动画是否需要显示 true|false  默认为true
	   *   @param showText      {Boolean} 加载文字是否需要显示 true|false  默认为true
	   *   @param loadingSize   {Number}  loading 图标的尺寸，长宽相等，默认180px（1080p分辨率下）
	   *   @param degStep       {Number}  每帧转动的角度, 默认为 8
	   *   @param defaultShow   {Boolean} 是否在创建时即显示loading，默认为 true
	   */

	  function NewLoading(cfg) {
	    _classCallCheck(this, NewLoading);

	    if (!cfg) cfg = {};
	    this.container = cfg.container ? cfg.container : document.body;
	    this.showBlock = cfg.showBlock ? cfg.showBlock : true;
	    this.showText = cfg.showText ? cfg.showText : true;
	    this.loadingSize = cfg.loadingSize ? cfg.loadingSize : 180;
	    this.degStep = cfg.degStep ? cfg.degStep : 8;
	    if (cfg.defaultShow != undefined && cfg.defaultShow != null) {
	      this.defaultShow = cfg.defaultShow;
	    } else {
	      this.defaultShow = true;
	    }

	    if (!this.showBlock && !this.showText) {
	      return;
	    }

	    this.running = false; // 是否在动
	    this.loadingContent = null;
	    this.init();
	  }

	  /**
	   * init 组件初始化方法
	   * @memberOf NewLoading.prototype
	   * @method init
	   */

	  NewLoading.prototype.init = function init() {
	    this.renderUI();
	    if (this.defaultShow) {
	      this.start();
	    }
	  };

	  /**
	   * renderUI 渲染 UI
	   * @memberOf NewLoading.prototype
	   * @method renderUI
	   */

	  NewLoading.prototype.renderUI = function renderUI() {
	    if (!this.showBlock && !this.showText) {
	      return;
	    }

	    var docW = BASE_WIDTH,

	    // styles
	    loadingContentStyle = 'width: 100%;\n                            height: 100%;\n                            display: none;\n                            background-color: rgba(0, 0, 0, 0.5);\n                            text-align: center;\n                            position: absolute; \n                            left: 0;\n                            top: 0;\n                            color: #fff;\n                            z-index: 99999',
	        blockContentStyle = 'width: ' + this.loadingSize * docW / BASE_WIDTH + 'px; \n                            height: ' + this.loadingSize * docW / BASE_WIDTH + 'px;\n                            margin: ' + -this.loadingSize * docW / (BASE_WIDTH * 2) + 'px auto;\n                            position: relative;\n                            top: 50%;\n                            font-size: ' + 54 * docW / BASE_WIDTH + 'px',
	        loadingTextStyle = 'font-size: ' + 24 * docW / BASE_WIDTH + 'px; \n                            position: relative;\n                            margin-top: ' + 24 * docW / BASE_WIDTH + 'px;\n                            width: ' + (this.loadingSize * docW / BASE_WIDTH + 300) + 'px;\n\n                            height: ' + 30 * docW / BASE_WIDTH + 'px;\n                            text-align:center;\n                            margin-left:-150px;',
	        message1WrapStyle = 'display: flex;\n                            justify-content: center;\n                            align-items: center;\n                            position: absolute;\n                            top: 0;\n                            left: 0;\n                            width: 100%;\n                            height: 100%;\n                            padding-left: ' + 15 * docW / BASE_WIDTH + 'px;',
	        imgStyle = 'width: 100%;\n                            height: 100%;',
	        percentIconStyle = 'width: ' + 30 * docW / BASE_WIDTH + 'px;\n                            height: ' + 30 * docW / BASE_WIDTH + 'px;\n                            font-size: ' + 24 * docW / BASE_WIDTH + 'px;\n                            visibility: hidden;\n                            padding-top: ' + 15 * docW / BASE_WIDTH + 'px;',
	        jMessage1Styel = 'height: ' + 60 * docW / BASE_WIDTH + 'px;\n                            line-height: ' + 60 * docW / BASE_WIDTH + 'px;',
	        html = '',
	        div = document.createElement("div");

	    if (this.showBlock) {
	      html += '<div class="circle-loading-block-content" style="' + blockContentStyle + '">\n                <div class="circle-loading-message1-wrap" style="' + message1WrapStyle + '">\n                  <div class="circle-loading-message1" style="' + jMessage1Styel + '"></div>\n                  <div class="circle-loading-percent-icon" style="' + percentIconStyle + '">%</div>\n                </div>\n                <img class="circle-loading-rotate-content" style="' + imgStyle + '" src="' + imgSrc + '">\n                ' + (this.showText ? '<div class="circle-loading-message2" style="' + loadingTextStyle + '"></div>' : '') + '\n              </div>';
	    }

	    div.setAttribute('style', loadingContentStyle);
	    div.innerHTML = html;
	    this.container.appendChild(div);
	    this.loadingContent = div;
	    this.docW = docW;
	  };

	  /**
	   * start 开始动画
	   * @memberOf NewLoading.prototype
	   * @method start
	   */

	  NewLoading.prototype.start = function start() {
	    this.loadingContent.style.display = 'block';
	    this.running = true;
	    var dom = this.loadingContent.querySelector('.circle-loading-rotate-content');
	    this.curDeg = 0;
	    function rotate(dom) {
	      this.curDeg += this.degStep;
	      if (this.curDeg >= 360) {
	        this.curDeg = 0;
	      }
	      dom.style.transform = 'rotate(' + this.curDeg + 'deg)';
	    }

	    this.timer = setInterval(rotate.bind(this, dom), 16);
	  };

	  /**
	   * stop 停止动画
	   * @memberOf NewLoading.prototype
	   * @method stop
	   */

	  NewLoading.prototype.stop = function stop() {
	    this.running = false;
	    var dom = this.loadingContent.querySelector('.circle-loading-rotate-content');
	    clearInterval(this.timer);
	    this.timer = null;
	    dom.style.transform = 'rotate(0deg)';
	  };

	  /**
	   * show 显示 loading
	   * @memberOf NewLoading.prototype
	   * @method show
	   */

	  NewLoading.prototype.show = function show() {
	    if (this.loadingContent) {
	      this.loadingContent.style.display = 'block';
	      if (this.running) {
	        this.stop();
	      }
	      this.start();
	    }
	  };

	  /**
	   * hide 隐藏 loading
	   * @memberOf NewLoading.prototype
	   * @method hide
	   */

	  NewLoading.prototype.hide = function hide() {
	    if (this.loadingContent) {
	      this.stop();
	      this.loadingContent.style.display = 'none';
	    }
	  };

	  /**
	   * setBg 设置 loading 背景颜色
	   * @memberOf NewLoading.prototype
	   * @method setBg
	   * @param color {String} css color 属性值
	   */

	  NewLoading.prototype.setBg = function setBg(color) {
	    if (this.loadingContent) {
	      this.loadingContent.style.backgroundColor = color;
	    }
	  };

	  /**
	   * remove 删除 loading
	   * @memberOf NewLoading.prototype
	   * @method remove
	   */

	  NewLoading.prototype.remove = function remove() {
	    if (this.loadingContent) {
	      this.stop();
	      this.container.removeChild(this.loadingContent);
	    }
	  };

	  /**
	   * setMessage1 设置消息内容1
	   * @memberOf NewLoading.prototype
	   * @method setMessage1
	   * @param msg {String} 消息内容
	   */

	  NewLoading.prototype.setMessage1 = function setMessage1(msg) {
	    if (msg.indexOf('%') != -1) {
	      this.loadingContent.querySelector('.circle-loading-percent-icon').style.visibility = 'visible';
	      msg = msg.replace('%', '');
	    } else {
	      this.loadingContent.querySelector('.circle-loading-percent-icon').style.visibility = 'hidden';
	    }
	    this.loadingContent.querySelector('.circle-loading-message1').textContent = msg;
	  };

	  /**
	   * setMessage2 设置消息内容2
	   * @memberOf NewLoading.prototype
	   * @method setMessage2
	   * @param msg {String} 消息内容
	   */

	  NewLoading.prototype.setMessage2 = function setMessage2(msg) {
	    this.loadingContent.querySelector('.circle-loading-message2').textContent = msg;
	  };

	  /**
	   * resize 重新设置loading尺寸，如果不传参数，将根据容器大小自适应缩放
	   * @memberOf NewLoading.prototype
	   * @method resize
	   * @param scale {Number} 缩放的倍数
	   */

	  NewLoading.prototype.resize = function resize(scale) {
	    var loadingBlockContent = this.loadingContent.querySelector('.circle-loading-block-content');
	    var scaleImpl = scale;
	    if (!scale) {
	      scaleImpl = this.container.clientWidth / this.docW;
	    }
	    loadingBlockContent.style.transform = 'scale(' + scaleImpl + ')';
	  };

	  /**
	   * getName 获取组件名称
	   * @memberOf NewLoading.prototype
	   * @method getName
	   * @return {String}
	   */

	  NewLoading.prototype.getName = function getName() {
	    return 'NewLoading';
	  };

	  return NewLoading;
	})();

	exports['default'] = NewLoading;
	module.exports = exports['default'];

/***/ },
/* 4 */
/***/ function(module, exports) {

	"use strict";

	/**
	 * Created by huanlai.whl on 2017/3/25.
	 */
	Object.defineProperty(exports, "__esModule", {
	    value: true
	});
	function VideoList(videoPlayer) {
	    this.TAG = "JSVideoPlayer::";
	    console.log(this.TAG + "on VideoList constructor");
	    this.videoPlayer = videoPlayer;
	    this.isShowing = false;
	    this.initView();
	}

	VideoList.prototype.initView = function () {
	    var div = document.createElement('div');
	    div.innerHTML = '<div class="video-list" fe-role="Grid" fe-cfg="grid_row:5,grid_col:1,grid_duration:0.1,delay_style:1,no_empty:yes,disable:yes">\n   ' + '<div class="video-list-item-wrapper" fe-role="Widget">' + '<div class="video-list-item" fe-role="Widget"><img /><p></p></div></div></div>';
	    this._domNode = div.childNodes[0];
	    this.videoPlayer._domNode.appendChild(this._domNode);
	    FocusEngine.render();
	    this.listWidget = FocusEngine.getWidgetById(this._domNode.id);
	    this.callBack1 = this.listWidget.on('ok', (function (e) {
	        var whichData = e.target.parentWidget.whichData;
	        console.log(this.TAG + "  whichData === " + whichData);
	        this.videoPlayer.currentIndex = whichData;
	        if (this.videoPlayer.onItemClickListener) {
	            this.videoPlayer.onItemClickListener(this.playList[whichData]);
	        } else {
	            this.videoPlayer.setDataSrc(this.playList[whichData]);
	        }
	        setTimeout((function () {
	            this.hide();
	        }).bind(this), 100);
	        e.stopPropagation();
	    }).bind(this));

	    this.callBack2 = this.listWidget.on('keydown', function (e) {
	        e.stopPropagation();
	    });
	};

	/**
	 * 隐藏列表
	 */
	VideoList.prototype.hide = function () {
	    if (this._domNode && this.isShowing) {
	        this.isShowing = false;
	        this.listWidget.disable();
	        FocusEngine.getRoot().freeze();
	        this._domNode.style.visibility = "hidden";
	    }
	};

	/**
	 * 显示列表
	 */
	VideoList.prototype.show = function () {
	    if (this._hideTimer) {
	        clearTimeout(this._hideTimer);
	    }
	    this._hideTimer = setTimeout((function () {
	        this.hide();
	    }).bind(this), 8000);
	    if (this.isShowing) {
	        return;
	    }
	    console.log(this.TAG + "showVideoList");
	    if (this.isShowing) {
	        return;
	    }
	    this.isShowing = true;
	    this._domNode.style.visibility = "visible";
	    FocusEngine.getRoot().activate();
	    this.listWidget.enable();
	    this.listWidget.focus();
	    this.listWidget.setData(this.playList, this.listWidget.dataIndex);
	};

	VideoList.prototype.isShow = function () {
	    return this.isShowing;
	};

	VideoList.prototype.setPlayList = function (playList, index) {
	    Log(" VideoList setPlayList index == " + index);
	    this.playList = playList;
	    this.index = index;
	    this.listWidget.setData(playList, index);
	};

	VideoList.prototype.setItemRender = function (callBack) {
	    Log("VideoList setItemRender");
	    this.listWidget.setItemRender(callBack);
	};

	VideoList.prototype.onDestroy = function () {
	    this.listWidget.off(this.callBack1);
	    this.listWidget.off(this.callBack2);
	};

	exports["default"] = VideoList;
	module.exports = exports["default"];

/***/ },
/* 5 */
/***/ function(module, exports, __webpack_require__) {

	// style-loader: Adds some css to the DOM by adding a <style> tag

	// load the styles
	var content = __webpack_require__(6);
	if(typeof content === 'string') content = [[module.id, content, '']];
	// add the styles to the DOM
	var update = __webpack_require__(8)(content, {});
	if(content.locals) module.exports = content.locals;
	// Hot Module Replacement
	if(false) {
		// When the styles change, update the <style> tags
		if(!content.locals) {
			module.hot.accept("!!../../node_modules/.0.16.0@css-loader/index.js!./video_controls.css", function() {
				var newContent = require("!!../../node_modules/.0.16.0@css-loader/index.js!./video_controls.css");
				if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
				update(newContent);
			});
		}
		// When the module is disposed, remove the <style> tags
		module.hot.dispose(function() { update(); });
	}

/***/ },
/* 6 */
/***/ function(module, exports, __webpack_require__) {

	exports = module.exports = __webpack_require__(7)();
	// imports


	// module
	exports.push([module.id, "/*--------------------------------进度条--------------------------*/\r\n#videoCotraller {\r\n    position: absolute;\r\n    width: 100% !important;\r\n    height: 100% !important;\r\n    z-index: 100;\r\n    top: 0px;\r\n    left: 0px;\r\n    opacity:0;\r\n}\r\n\r\n#videoCotraller .videoHeaderMask {\r\n    position: absolute;\r\n    top: 0px;\r\n    width: 100%;\r\n    height: 80px;\r\n    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8) 20%, rgba(0, 0, 0, 0.6) 40%, rgba(0, 0, 0, 0.4) 70%, rgba(0, 0, 0, 0.1) 100%);\r\n}\r\n\r\n#videoCotraller .videoTitle {\r\n    padding: 20px 0 0 20px;\r\n    font-size: 40px;\r\n    color:#fff;\r\n}\r\n\r\n#videoCotraller .videoControls {\r\n    position: absolute;\r\n    bottom: 0px;\r\n    width: 100%;\r\n    height: 150px;\r\n    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 20%, rgba(0, 0, 0, 0.8) 40%, rgba(0, 0, 0, 0.5) 70%, rgba(0, 0, 0, 0.01) 100%);\r\n}\r\n\r\n#videoCotraller .currentTime {\r\n    position: absolute;\r\n    left: 40px;\r\n    bottom: 8px;\r\n    color:white;\r\n    font-size: 30px;\r\n}\r\n\r\n#videoCotraller .progressWrap {\r\n    position: absolute;\r\n    bottom: 18px;\r\n    left: 192px;\r\n    width: 80%;\r\n    height: 25px;\r\n    background: rgba(255, 255, 255, 0.7);\r\n}\r\n\r\n#videoCotraller .playProgress {\r\n    width: 0px;\r\n    height: 25px;\r\n    background-color: rgba(17, 160, 252, 1);\r\n    position: absolute;\r\n    left: 0px;\r\n}\r\n\r\n#videoCotraller .videoDuration {\r\n    position: absolute;\r\n    right: 40px;\r\n    bottom: 8px;\r\n    color: white;\r\n    font-size: 30px;\r\n}\r\n\r\n#videoCotraller .videoPointer {\r\n    background: #11A0FC;\r\n    padding: 10px 10px;\r\n    color: #fff;\r\n    position: absolute;\r\n    bottom: 56px;\r\n    left: 115px;\r\n    text-align: center;\r\n    font-size: 30px;\r\n    display: none;\r\n}\r\n\r\n#videoCotraller .videoPointer span {\r\n    display: block;\r\n    border-width: 20px;\r\n    border-style: solid;\r\n    border-color: #11A0FC transparent transparent transparent;\r\n    position: absolute;\r\n    top: 55px;\r\n    left: 50%;\r\n    margin-left: -10px;\r\n}\r\n\r\n/*---------------------暂停图标-------------------*/\r\n.videoPanel {\r\n    width: 200px;\r\n    height: 200px;\r\n    position: absolute;\r\n    top: 50%;\r\n    left: 50%;\r\n    margin-left: -100px;\r\n    margin-top: -100px;\r\n    border-radius: 100px;\r\n    background: rgba(0, 0, 0, 0.8);\r\n    display: none;\r\n    z-index: 10;\r\n}\r\n\r\n.triangleRight {\r\n    width: 120px;\r\n    height: 120px;\r\n    border-color: transparent transparent transparent transparent;\r\n    left:40px;\r\n    top:40px;\r\n    margin: 0 auto;\r\n    position: relative;\r\n}\r\n\r\n.triangleRight span {\r\n    display: block;\r\n    border-width: 60px;\r\n    border-style: solid;\r\n    border-color: transparent transparent transparent #fff;;\r\n}\r\n\r\n/*---------------------------------Video尺寸变化----------------------------------*/\r\n.video_item_fullscrren {\r\n    width: 1920px !important;\r\n    height: 1080px !important;\r\n    margin: 0 !important;\r\n    padding: 0 !important;\r\n    position: fixed !important;\r\n    top:0 !important;\r\n    left:0 !important;\r\n    z-index:99 !important;\r\n}\r\n\r\n.video_item_zero {\r\n    width: 0px !important;\r\n    height: 0px !important;\r\n    margin: 0 !important;\r\n    padding: 0 !important;\r\n    position: fixed !important;\r\n    top:0 !important;\r\n    left:0 !important;\r\n    display:none !important;\r\n    z-index:0 !important;\r\n}\r\n\r\n.video_item {\r\n    margin: 0;\r\n    padding: 0;\r\n    width: 100%;\r\n    height: 100%;\r\n    object-fit: fill;\r\n    z-index: 9;\r\n}\r\n\r\n.video_palyer {\r\n    margin: 0;\r\n    padding: 0;\r\n    width: 100%;\r\n    height: 100%;\r\n    object-fit: fill;\r\n    position: absolute;\r\n    z-index: 9;\r\n}\r\n\r\n/*------------------------------------错误页面----------------------------------*/\r\n.play_error_page{\r\n    top:0;\r\n    left: 0;\r\n    margin: 0;\r\n    padding: 0;\r\n    width: 100%;\r\n    height: 100%;\r\n    background-color: #0d151f;\r\n    object-fit: fill;\r\n    position: absolute;\r\n    z-index: 99;\r\n}\r\n\r\n.play_error_page img{\r\n    top: 50%;\r\n    left: 50%;\r\n    margin-left: -100px;\r\n    margin-top: -150px;\r\n    width: 200px;\r\n    height: 200px;\r\n    object-fit: fill;\r\n    position: absolute;\r\n}\r\n\r\n.play_error_page p{\r\n    top: 50%;\r\n    margin-top: 80px;\r\n    width: 100%;\r\n    height: 64px;\r\n    line-height: 64px;\r\n    font-size: 36px;\r\n    color: #FFFFFF;\r\n    text-align: center;\r\n    object-fit: fill;\r\n    position: absolute;\r\n}\r\n\r\n/*-----------------------------------选集列表----------------------------------*/\r\n.video-list{\r\n    position:absolute;\r\n    top:0;\r\n    left:0;\r\n    height: 1080px;\r\n    width: 460px;\r\n    overflow: hidden;\r\n    background: rgba(00, 00, 00, 0.9);\r\n    z-index: 99;\r\n    visibility: hidden;\r\n}\r\n\r\n.video-list .video-list-item-wrapper{\r\n    width: 460px;\r\n    height: 210px;\r\n}\r\n\r\n.video-list .video-list-item{\r\n    position: absolute;\r\n    width: 360px;\r\n    height: 170px;\r\n    left: 47px;\r\n    top: 17px;\r\n    border: solid 3px transparent;\r\n    border-radius: 15px;\r\n}\r\n\r\n.video-list .video-list-item.fe-focus{\r\n    transform: scale3d(1.1, 1.1, 1.1);\r\n    border: solid 3px #ffffff !important;\r\n    box-shadow: 0 3px 20px rgba(0, 0, 0, 0.8);\r\n    z-index: 9999;\r\n}\r\n\r\n.video-list .video-list-item img{\r\n    width: 100%;\r\n    height: 100%;\r\n    border-radius: 15px;\r\n}\r\n\r\n.video-list .video-list-item p{\r\n    position: absolute;\r\n    width: 100%;\r\n    height: 60px;\r\n    bottom: 0px;\r\n    border-bottom-left-radius: 15px;\r\n    border-bottom-right-radius: 15px;\r\n    line-height: 60px;\r\n    font-size: 30px;\r\n    text-align: center;\r\n    color:#ffffff;\r\n    overflow: hidden;\r\n    text-overflow:ellipsis;\r\n    background: rgba(16, 32, 32, 0.8);\r\n    z-index: 2;\r\n}", ""]);

	// exports


/***/ },
/* 7 */
/***/ function(module, exports) {

	/*
		MIT License http://www.opensource.org/licenses/mit-license.php
		Author Tobias Koppers @sokra
	*/
	// css base code, injected by the css-loader
	"use strict";

	module.exports = function () {
		var list = [];

		// return the list of modules as css string
		list.toString = function toString() {
			var result = [];
			for (var i = 0; i < this.length; i++) {
				var item = this[i];
				if (item[2]) {
					result.push("@media " + item[2] + "{" + item[1] + "}");
				} else {
					result.push(item[1]);
				}
			}
			return result.join("");
		};

		// import a list of modules into the list
		list.i = function (modules, mediaQuery) {
			if (typeof modules === "string") modules = [[null, modules, ""]];
			var alreadyImportedModules = {};
			for (var i = 0; i < this.length; i++) {
				var id = this[i][0];
				if (typeof id === "number") alreadyImportedModules[id] = true;
			}
			for (i = 0; i < modules.length; i++) {
				var item = modules[i];
				// skip already imported module
				// this implementation is not 100% perfect for weird media query combinations
				//  when a module is imported multiple times with different media queries.
				//  I hope this will never occur (Hey this way we have smaller bundles)
				if (typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) {
					if (mediaQuery && !item[2]) {
						item[2] = mediaQuery;
					} else if (mediaQuery) {
						item[2] = "(" + item[2] + ") and (" + mediaQuery + ")";
					}
					list.push(item);
				}
			}
		};
		return list;
	};

/***/ },
/* 8 */
/***/ function(module, exports, __webpack_require__) {

	/*
		MIT License http://www.opensource.org/licenses/mit-license.php
		Author Tobias Koppers @sokra
	*/
	var stylesInDom = {},
		memoize = function(fn) {
			var memo;
			return function () {
				if (typeof memo === "undefined") memo = fn.apply(this, arguments);
				return memo;
			};
		},
		isOldIE = memoize(function() {
			return /msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase());
		}),
		getHeadElement = memoize(function () {
			return document.head || document.getElementsByTagName("head")[0];
		}),
		singletonElement = null,
		singletonCounter = 0;

	module.exports = function(list, options) {
		if(false) {
			if(typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
		}

		options = options || {};
		// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
		// tags it will allow on a page
		if (typeof options.singleton === "undefined") options.singleton = isOldIE();

		var styles = listToStyles(list);
		addStylesToDom(styles, options);

		return function update(newList) {
			var mayRemove = [];
			for(var i = 0; i < styles.length; i++) {
				var item = styles[i];
				var domStyle = stylesInDom[item.id];
				domStyle.refs--;
				mayRemove.push(domStyle);
			}
			if(newList) {
				var newStyles = listToStyles(newList);
				addStylesToDom(newStyles, options);
			}
			for(var i = 0; i < mayRemove.length; i++) {
				var domStyle = mayRemove[i];
				if(domStyle.refs === 0) {
					for(var j = 0; j < domStyle.parts.length; j++)
						domStyle.parts[j]();
					delete stylesInDom[domStyle.id];
				}
			}
		};
	}

	function addStylesToDom(styles, options) {
		for(var i = 0; i < styles.length; i++) {
			var item = styles[i];
			var domStyle = stylesInDom[item.id];
			if(domStyle) {
				domStyle.refs++;
				for(var j = 0; j < domStyle.parts.length; j++) {
					domStyle.parts[j](item.parts[j]);
				}
				for(; j < item.parts.length; j++) {
					domStyle.parts.push(addStyle(item.parts[j], options));
				}
			} else {
				var parts = [];
				for(var j = 0; j < item.parts.length; j++) {
					parts.push(addStyle(item.parts[j], options));
				}
				stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};
			}
		}
	}

	function listToStyles(list) {
		var styles = [];
		var newStyles = {};
		for(var i = 0; i < list.length; i++) {
			var item = list[i];
			var id = item[0];
			var css = item[1];
			var media = item[2];
			var sourceMap = item[3];
			var part = {css: css, media: media, sourceMap: sourceMap};
			if(!newStyles[id])
				styles.push(newStyles[id] = {id: id, parts: [part]});
			else
				newStyles[id].parts.push(part);
		}
		return styles;
	}

	function createStyleElement() {
		var styleElement = document.createElement("style");
		var head = getHeadElement();
		styleElement.type = "text/css";
		head.appendChild(styleElement);
		return styleElement;
	}

	function createLinkElement() {
		var linkElement = document.createElement("link");
		var head = getHeadElement();
		linkElement.rel = "stylesheet";
		head.appendChild(linkElement);
		return linkElement;
	}

	function addStyle(obj, options) {
		var styleElement, update, remove;

		if (options.singleton) {
			var styleIndex = singletonCounter++;
			styleElement = singletonElement || (singletonElement = createStyleElement());
			update = applyToSingletonTag.bind(null, styleElement, styleIndex, false);
			remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true);
		} else if(obj.sourceMap &&
			typeof URL === "function" &&
			typeof URL.createObjectURL === "function" &&
			typeof URL.revokeObjectURL === "function" &&
			typeof Blob === "function" &&
			typeof btoa === "function") {
			styleElement = createLinkElement();
			update = updateLink.bind(null, styleElement);
			remove = function() {
				styleElement.parentNode.removeChild(styleElement);
				if(styleElement.href)
					URL.revokeObjectURL(styleElement.href);
			};
		} else {
			styleElement = createStyleElement();
			update = applyToTag.bind(null, styleElement);
			remove = function() {
				styleElement.parentNode.removeChild(styleElement);
			};
		}

		update(obj);

		return function updateStyle(newObj) {
			if(newObj) {
				if(newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap)
					return;
				update(obj = newObj);
			} else {
				remove();
			}
		};
	}

	var replaceText = (function () {
		var textStore = [];

		return function (index, replacement) {
			textStore[index] = replacement;
			return textStore.filter(Boolean).join('\n');
		};
	})();

	function applyToSingletonTag(styleElement, index, remove, obj) {
		var css = remove ? "" : obj.css;

		if (styleElement.styleSheet) {
			styleElement.styleSheet.cssText = replaceText(index, css);
		} else {
			var cssNode = document.createTextNode(css);
			var childNodes = styleElement.childNodes;
			if (childNodes[index]) styleElement.removeChild(childNodes[index]);
			if (childNodes.length) {
				styleElement.insertBefore(cssNode, childNodes[index]);
			} else {
				styleElement.appendChild(cssNode);
			}
		}
	}

	function applyToTag(styleElement, obj) {
		var css = obj.css;
		var media = obj.media;
		var sourceMap = obj.sourceMap;

		if(media) {
			styleElement.setAttribute("media", media)
		}

		if(styleElement.styleSheet) {
			styleElement.styleSheet.cssText = css;
		} else {
			while(styleElement.firstChild) {
				styleElement.removeChild(styleElement.firstChild);
			}
			styleElement.appendChild(document.createTextNode(css));
		}
	}

	function updateLink(linkElement, obj) {
		var css = obj.css;
		var media = obj.media;
		var sourceMap = obj.sourceMap;

		if(sourceMap) {
			// http://stackoverflow.com/a/26603875
			css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
		}

		var blob = new Blob([css], { type: "text/css" });

		var oldSrc = linkElement.href;

		linkElement.href = URL.createObjectURL(blob);

		if(oldSrc)
			URL.revokeObjectURL(oldSrc);
	}


/***/ }
/******/ ]);